﻿CREATE TRIGGER [TipVieweds_update_trigger] ON [TipVieweds] FOR UPDATE AS
UPDATE [side] SET [local_update_peer_key] = 0, [restore_timestamp] = NULL, [update_scope_local_id] = NULL, [last_change_datetime] = GETDATE(), [UserID] = [i].[UserID] FROM [TipVieweds_tracking] [side] JOIN INSERTED AS [i] ON [side].[TipViewedID] = [i].[TipViewedID]